A simple shift rule for k-ary de Bruijn sequences

نویسندگان

  • Joe Sawada
  • Aaron Williams
  • Dennis Wong
چکیده

A k-ary de Bruijn sequence of order n is a cyclic sequence of length k in which each k-ary string of length n appears exactly once as a substring. A shift rule for a de Bruijn sequence of order n is a function that maps each length n substring to the next length n substring in the sequence. We present the first known shift rule for k-ary de Bruijn sequences that runs in O(1)-amortized time per symbol using O(n) space. Our rule generalizes the authors’ recent shift rule for the binary case (A surprisingly simple de Bruijn sequence construction, Discrete Mathematics 339, pages 127-131). 1 A new de Bruijn sequence construction A k-ary de Bruijn sequence is a cyclic sequence of length kn in which each k-ary string of length n appears exactly once as a substring. As an example, the cyclic sequence 111222333232212312113213313 is a 3-ary de Bruijn sequence for n = 3; the 27 unique length 3 substrings when considered cyclicly are: 111, 112, 122, 222, 223, 233, 333, 332, 323, 232, 322, 221, 212, 123, 231, 312, 121, 211, 113, 132, 321, 213, 133, 331, 313, 131, 311. As illustrated in this example, a k-ary de Bruijn sequence of order n induces a very specific type of cyclic order of k-ary strings of length n: the length n− 1 suffix of a given string is the same as the length n− 1 prefix of the next string in the ordering. The number of unique k-ary de Bruijn sequences for a given n and k is equal to k!k n−1 /kn [3]; however, only a few efficient constructions are known. In particular, there are . a Lyndon word concatenation algorithm by Fredricksen and Maiorana [11] that generates the lexicographically smallest de Bruijn sequence (also known as the Ford sequence), . a block concatenation algorithm by Ralston [16], . a lexicographic composition concatenation algorithm by Fredricksen and Kessler [10], and . two different pure cycle concatenation algorithms by Fredricksen [8], and Etzion and Lempel [5]. ∗School of Computer Science, University of Guelph, Canada. Research supported by NSERC. email: [email protected] †Division of Science, Mathematics, and Computing, Bard College at Simon‘s Rock, USA. email: [email protected] ‡School of Computer Science and Information Systems, Northwest Missouri State University, USA. email: [email protected]

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Efficient Generalized Shift-Rule for the Prefer-Max De Bruijn Sequence

One of the fundamental ways to construct De Bruijn sequences is by using a shift-rule. A shift-rule receives a word as an argument and computes the digit that appears after it in the sequence. An optimal shift-rule for an (n, k)-De Bruijn sequence runs in time O(n). We propose an extended notion we name a generalized-shift-rule, which receives a word, w, and an integer, c, and outputs the c dig...

متن کامل

Practical algorithms to rank necklaces, Lyndon words, and de Bruijn sequences

We present practical algorithms for ranking k-ary necklaces and Lyndon words of length n. The algorithms are based on simple counting techniques. By repeatedly applying the ranking algorithms, both necklaces and Lyndon words can be efficiently unranked. Then, explicit details are given to rank and unrank the length n substrings of the lexicographically smallest de Bruijn sequence of order n.

متن کامل

New Constructions for De Bruijn Tori

A De Bruijn torus is a periodic d−dimensional k−ary array such that each n1 × · · · × nd k−ary array appears exactly once with the same period. We describe two new methods of constructing such arrays. The first is a type of product that constructs a k1k2−ary torus from a k1−ary torus and a k2−ary torus. The second uses a decomposition of a d-dimensional torus to produce a d + 1 dimensional toru...

متن کامل

An Unoriented Variation on de Bruijn Sequences

For positive integers k, n, a de Bruijn sequence B(k, n) is a finite sequence of elements drawn from k characters whose subwords of length n are exactly the k words of length n on k characters. This paper introduces the unoriented de Bruijn sequence uB(k, n), an analog to de Bruijn sequences, but for which the sequence is read both forwards and backwards to determine the set of subwords of leng...

متن کامل

A MESHING TECHNIQUE FOR de BRUIJN TORI

An (R, S; m, n)k-de Bruijn torus is a k-ary R × S toroidal array with the property that every k-ary m × n matrix appears exactly once contiguously on the torus. The torus is a generalization of de Bruijn cycles and has been extended to higher dimensions by many authors. The central question, asked by Chung, Diaconis, and Graham, is for which R, S, m, n, and k such tori exist. In this note we de...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Discrete Mathematics

دوره 340  شماره 

صفحات  -

تاریخ انتشار 2017